from django.contrib import admin
from .models import Node, Connection

@admin.register(Node)
class NodeAdmin(admin.ModelAdmin):
    list_display = ('id', 'label', 'x_position', 'y_position')
    search_fields = ('id', 'label')

@admin.register(Connection)
class ConnectionAdmin(admin.ModelAdmin):
    list_display = ('source', 'target', 'weight')
    search_fields = ('source__id', 'target__id')
